package com.example.demo.test.restfulapi;

import org.springframework.web.bind.annotation.*;

/**
 * @auth
 **/
@RestController
@RequestMapping("/rest")
public class RestFulApiController {
    @PostMapping
    public void add(@RequestBody String s){
        System.out.println("我是添加接口"+s);
    }
    @DeleteMapping(value = "/{id}")
    public void deleted(@PathVariable Long id){
        System.out.println("我是删除"+id);
    }
    @PutMapping(value = "/{id}")
    public void update(@PathVariable Long id,@RequestBody String s){
        System.out.println("我是修改"+id+s);
    }
    @GetMapping(value = "/{id}")
    public void get(@PathVariable Long id){
        System.out.println("我是获取"+id);
    }
}
